package com.xz.xzmybatisagent.utils;

import java.util.ArrayList;
import java.util.List;

/**
 * <p>
 * 类扫描配置
 * </p>
 *
 * @author DONG.WANG17@HAND-CHINA.COM
 * @since 2025/3/24-03-24 15:52
 */
public class ClassScanConfig {
    /**
     * 包前缀
     */
    private String packagePrefix;
    /**
     * 过滤前缀
     */
    private String filterPrefix = "---xxx---";
    /**
     * 去除前缀
     */
    private String removePrefix = "java.main.";
    private Boolean childPackage = true;
    private Boolean includeInnerClasses = true;
    private List<String> excludedClasses = new ArrayList<>();
    private List<String> excludedDirectories = new ArrayList<>();

    public String getPackagePrefix() {
        return packagePrefix;
    }

    public void setPackagePrefix(String packagePrefix) {
        if (packagePrefix.endsWith(".")) {
            packagePrefix = packagePrefix.substring(0, packagePrefix.length() - 1);
        }
        this.packagePrefix = packagePrefix;
    }

    public String getFilterPrefix() {
        return filterPrefix;
    }

    public void setFilterPrefix(String filterPrefix) {
        this.filterPrefix = filterPrefix;
    }

    public String getRemovePrefix() {
        return removePrefix;
    }

    public void setRemovePrefix(String removePrefix) {
        if (!removePrefix.endsWith(".")) {
            removePrefix = removePrefix + ".";
        }
        this.removePrefix = removePrefix;
    }

    public Boolean getChildPackage() {
        return childPackage;
    }

    public void setChildPackage(Boolean childPackage) {
        this.childPackage = childPackage;
    }

    public Boolean getIncludeInnerClasses() {
        return includeInnerClasses;
    }

    public void setIncludeInnerClasses(Boolean includeInnerClasses) {
        this.includeInnerClasses = includeInnerClasses;
    }

    public List<String> getExcludedClasses() {
        return excludedClasses;
    }

    public void setExcludedClasses(List<String> excludedClasses) {
        this.excludedClasses = excludedClasses;
    }

    public List<String> getExcludedDirectories() {
        return excludedDirectories;
    }

    public void setExcludedDirectories(List<String> excludedDirectories) {
        this.excludedDirectories = excludedDirectories;
    }
}
